﻿<style>
	.left15{float:left !important;padding-left: 15px!important;}
</style>
<div class="row">
    <div class="col-xs-12 col-md-12 col-lg-12">
        <div class="widget">
            <div class="widget-header bg-blue">
            	<i class="widget-icon fa fa-arrow-left"></i>
                <span class="widget-caption">积分设置</span>
                <div class="widget-buttons">
                    <a href="#" data-toggle="maximize">
                        <i class="fa fa-expand"></i>
                    </a>
                    <a href="#" data-toggle="collapse">
                        <i class="fa fa-minus"></i>
                    </a>
                    <a href="#" data-toggle="dispose">
                        <i class="fa fa-times"></i>
                    </a>
                </div>
            </div>
            <div class="widget-body" style="height: auto;">
                
                <form id="bbForm" action="" method="post" class="form-horizontal"
                                                  data-bv-message=""
                                                  data-bv-feedbackicons-valid="glyphicon glyphicon-ok"
                                                  data-bv-feedbackicons-invalid="glyphicon glyphicon-remove"
                                                  data-bv-feedbackicons-validating="glyphicon glyphicon-refresh">
                <input type="hidden" name="id" value="{$cache.id}">

				<div class="form-group">
                        <label class="col-lg-2 control-label">注册赠送:</label>
                        <div class="col-lg-1">
                            <div class="input-group input-group-sm col-lg-1">
                                <input class="checkbox-slider slider-icon colored-darkorange" type="checkbox" id="giftCheck">
                                <span class="text"></span>
                                <input type="hidden" name="isgift" id="isgift" value="{$cache.isgift}">
                            </div>
                        </div>
                         <label class="col-lg-1 control-label"></label>
                         <label class="col-lg-0 control-label" style="float: left;">&nbsp;&nbsp;注：金额为0元就不赠送抵用劵。 </label>
                   </div>
                   
                   <div class="form-group isgift" style="display: none;">
                        <label class="col-lg-2 control-label">注册赠送设置:</label>
                        <div class="input-group input-group-sm col-lg-2 left15">
		                    <select class="form-control" name="gift_type">
                                  <option value="1" <eq name="data.gift_type" value="2">selected</eq>>抵用券</option>
                             </select>
		                </div>
		                <div class="input-group input-group-sm col-lg-1 left15">
		                    <span class="input-group-addon">金额</span>
		                    <input type="text" class="form-control" name="gift_money" value="{$cache.gift_money}" style="min-width: 45px;">
		                </div>
		                <div class="input-group input-group-sm col-lg-1 left15">
		                    <span class="input-group-addon">有效</span>
		                    <input type="text" class="form-control" name="gift_days" value="{$cache.gift_days}" style="min-width: 45px;">
		                    <span class="input-group-addon">天</span>
		                </div>
		                <div class="input-group input-group-sm col-lg-1  ">
		                    <span class="input-group-addon">满</span>
		                    <input type="text" class="form-control" name="gift_usemoney" value="{$cache.gift_usemoney}" style="min-width: 45px;">
		                    <span class="input-group-addon">使用</span>
		                </div>
		               
                   </div>
				
				 <div class="form-group isgift" style="display: none;">
                        <label class="col-lg-2 control-label">注册赠送:</label>
                        <div class="input-group input-group-sm col-lg-1 left15">
		                    <span class="input-group-addon">积分</span>
		                    <input type="text" class="form-control" name="reg_score" value="{$cache.reg_score}" style="min-width: 45px;">
		                </div>
                 </div>
				
				
				<div class="form-group">
				    <label class="col-lg-2 control-label">首次下单赠送:</label>
                        <div class="input-group input-group-sm col-lg-1 left15">
		                    <span class="input-group-addon">积分</span>
		                    <input type="text" class="form-control" name="conp_score" value="{$cache.conp_score}" style="min-width: 45px;">
		                </div>
				</div>
				
				
				<div class="form-group">
				    <label class="col-lg-2 control-label">每次洗衣赠送:</label>
                        <div class="input-group input-group-sm col-lg-1 left15">
		                    <span class="input-group-addon">积分(%)</span>
		                    <input type="text" class="form-control" name="consume_score" value="100" style="min-width: 45px;">
		                </div>
		                <label class="col-lg-0 control-label">&nbsp;&nbsp;100是按洗衣的价格的100%给积分，如80 就是按订单价格的80% 来给积分。 </label>
				</div>
				

				<div class="form-group">
				    <label class="col-lg-2 control-label">推荐好友赠送:</label>
                        <div class="input-group input-group-sm col-lg-1 left15">
		                    <span class="input-group-addon">积分</span>
		                    <input type="text" class="form-control" name="quote_score" value="{$cache.quote_score}" style="min-width: 45px;">
		                </div>
				</div>
				
				
				<hr>
				
				 <div class="form-group">
                        <label class="col-lg-2 control-label">推荐的会员消费</label>
				        <div class="col-lg-2">
	          				<div class="input-group input-group-xs">
	               			<span class="input-group-btn">
	                  			 <button class="btn btn-darkorange" type="button">一级(%)：</button>
	               			</span>
	               			<input name="fx1rate" type="text" class="form-control" value="{$cache.fx1rate}" >
	          				</div>
       					</div>
				        <div class="col-lg-2">
					         <div class="input-group input-group-xs">
					               <span class="input-group-btn">
					                   <button class="btn btn-darkorange" type="button">二级(%)：</button>
					               </span>
					               <input name="fx2rate" type="text" class="form-control" value="{$cache.fx2rate}" >
					          </div>  
				        </div>   
						<div class="col-lg-2">
					         <div class="input-group input-group-xs">
					               <span class="input-group-btn">
					                   <button class="btn btn-darkorange" type="button">三级(%)：</button>
					               </span>
					               <input name="fx3rate" type="text" class="form-control" value="{$cache.fx3rate}" >
					          </div>  
				        </div> 						
                   </div>
                   
                  
                    <div class="form-group">
                        <label class="col-lg-2 control-label">推荐会员充值</label>
				        <div class="col-lg-2">
	          				<div class="input-group input-group-xs">
	               			<span class="input-group-btn">
	                  			 <button class="btn btn-darkorange" type="button">一级(%)：</button>
	               			</span>
	               			<input name="fx1cz" type="text" class="form-control" value="{$cache.fx1cz}" >
	          				</div>
       					</div>
				        <div class="col-lg-2">
					         <div class="input-group input-group-xs">
					               <span class="input-group-btn">
					                   <button class="btn btn-darkorange" type="button">二级(%)：</button>
					               </span>
					               <input name="fx2cz" type="text" class="form-control" value="{$cache.fx2cz}" >
					          </div>  
				        </div>   
						<div class="col-lg-2">
					         <div class="input-group input-group-xs">
					               <span class="input-group-btn">
					                   <button class="btn btn-darkorange" type="button">三级(%)：</button>
					               </span>
					               <input name="fx3cz" type="text" class="form-control" value="{$cache.fx3cz}" >
					          </div>  
				        </div> 						
                   </div>

                
               <div class="form-group">
                         <div class="col-lg-offset-2 col-lg-4">
                         <button class="btn btn-primary btn-lg" type="submit">保存</button>&nbsp;&nbsp;&nbsp;&nbsp;
                         <button class="btn btn-palegreen btn-lg" type="reset">重填</button>
                    </div>
                </div>
                
            </div>
        </div>
    </div>
</div>

<!--面包屑导航封装-->
<div id="tmpbread" style="display: none;">{$breadhtml}</div>
<script type="text/javascript">
	setBread($('#tmpbread').html());
</script>

<!--表单验证与提交封装-->
<script type="text/javascript">
	$('#bbForm').bootstrapValidator({
		submitHandler: function (validator, form, submitButton) {
           var tourl="{:U('Admin/index/jifenset')}";
           var data=$('#bbForm').serialize();
           $.bb.ajax('post',tourl,data,null);
           return false;
        },
	});
	if ($('#isgift').val()==1) {
		$('#giftCheck').attr("checked","checked");
		$('.isgift').show();
	}
	$('#giftCheck').on('click', function () {
		var isgift=$('#isgift').val();
		$('#isgift').val(1-isgift*1);
	    $('.isgift').toggle();
	    $('.submit').removeAttr("disabled");
	});
</script>



<!--/表单验证与提交封装-->